import { request } from './request'

// 获取用户列表
export const getUsersListapi = (params) => {
    return request({
        url: 'users',
        params
    })
}

export const addUserapi = (params) => {
    return request({
        url: 'users',
        method: 'post',
        data: params
    })
}

export const delUserapi = (id) => {
    console.log(id)
    return request({
        url: `users/${id}`,
        method: 'delete'
    })
}



export const updataUserapi = (id, params) => {
    console.log(id)
    return request({
        url: `users/${id}`,
        method: 'put',
        data: params
    })
}
export const selectIdapi = (id) => {
    return request({
        url: `users/${id}`
    })
}